import Home from "../views/Home"
import { WapHomeO,MoreO,NewspaperO,BulbO  } from '@react-vant/icons';
import {lazy} from "react"
const routes=[{
    path:'/home',
    component:Home,
    children:[{
        path:'/home/homePage',
        component:lazy(()=> import("../views/home/homePage")),
        title:'首页',
        ico:<WapHomeO  />
    },
    {
        path:'/home/findHouse',
        component:lazy(()=> import("../views/home/findHouse")),
        title:"找房",
        ico:<NewspaperO  />

    },
    {
        path:'/home/Public',
        component:lazy(()=> import("../views/home/Public")),
        title:"发布",
        ico:<BulbO  />
    },
    {
        path:'/home/message',
        component:lazy(()=> import("../views/home/Message")),
        title:"消息",
        ico:<MoreO  />
    },
    {
        path:'/home/my',
        component:lazy(()=> import("../views/home/my")),
        title:"我的",
        ico:<WapHomeO  />
    },
]
},{
    path:'/serch',
    component :lazy(()=>import('../views/Serch'))
},
{
    path:'/login',
    component :lazy(()=>import('../views/Login'))
},{
    path:'/detalis/:id',
    component :lazy(()=>import('../views/Detalis'))
},
{
    path: '/',  // 重定向:重新指向其它path,会改变网址,
   redirect: '/home/homePage',  // 重定向:重新指向其它path,会改变网址:"/home/homePage"
}
]
export default routes

